<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id='o'></div>
</body>
<script>
    // "<a href='javascript:void(0)'class='gridlink' onclick=\"orderDetails('" +1 + "')\">" + 44141 + "</a>";
    // "<a href='javascript:void(0)' class='gridlink' onclick='orderDetails(" + 1 + ")'>" + 44141 + "</a>";
   function w(){
    
       return  '<img src="dui.png" onload=\"orderDetails(this)\">'
       
   }
   function orderDetails(k){
       alert(k)
   }
  document.getElementById('o').innerHTML=w()
</script>
</html>